﻿@model CustomerForumSubscriptionsModel
@using Nop.Web.Extensions;
@using Nop.Web.Models.Customer;
@{    
    Layout = "~/Views/Shared/_Root.cshtml";

    Html.AddTitleParts(T("PageTitle.ForumSubscriptions").Text);
}
<div class="page account-page forum-subscriptions-page">
    <div class="page-title">
        <h1>
            @T("Account.ForumSubscriptions")</h1>
    </div>
    <div class="page-body">
        @if (Model.ForumSubscriptions.Count > 0)
        {
            <div class="description">
                @T("Account.ForumSubscriptions.Description")
            </div>
            <div class="subscription-list">
                <ul data-role="listview" data-inset="true" data-filter="false" data-theme="c">
                    @foreach (var fs in Model.ForumSubscriptions)
                    {
                        <li>
                            <div class="item">
                                <div>
                                    @if (fs.TopicSubscription)
                                    {
                                        @Html.RouteLink(fs.Title, "TopicSlug", new { Id = fs.ForumTopicId, slug = fs.Slug })
                                    }
                                    else
                                    {
                                        @Html.RouteLink(fs.Title, "ForumSlug", new { Id = fs.ForumId, slug = fs.Slug })
                                    }
                                </div>
                                <div class="buttons">
                                    <a href="@Url.RouteUrl("DeleteForumSubscription", new { subscriptionId = fs.Id })" data-role="button">@T("Common.Delete")</a>
                                </div>
                            </div>
                        </li>
                    }
                </ul>
                <div class="pager">
                    @Html.Pager(Model.PagerModel)
                </div>
            </div>
        }
        else
        {
            <div class="no-data">
                @T("Account.ForumSubscriptions.NoSubscriptions")
            </div>
        }
    </div>
</div>
